<template>
  <el-dialog v-model="centerDialogVisible" title="Notice" width="500" destroy-on-close center>
    <span>
      Notice: {{ diaItem.title }}
    </span>
    <div>
      <strong>Extra content (Not rendered)</strong>
    </div>
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="centerDialogVisible = false">Cancel</el-button>
        <el-button type="primary" @click="submit"> Confirm </el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script setup>
import { ref } from 'vue'

const emit = defineEmits(['confirm'])
const centerDialogVisible = ref(false)
const diaItem = ref({})

const submit = ()=>{
    emit('confirm')
}



const open = (item, type) => {
  centerDialogVisible.value = true
  diaItem.value = item
}
defineExpose({
  open
})
</script>
